#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<stdbool.h>

typedef int BTDataType;
#define max(x, y) ((x)>(y)?(x):(y))

typedef struct BinaryTreeNode
{
	BTDataType data;
	struct BinaryTreeNode* left;
	struct BinaryTreeNode* right;
}BTNode;



BTNode* CreatNode(BTDataType x);
void PrevOrder(BTNode* root);
void InOrder(BTNode* root);
void PostOrder(BTNode* root);
int BTreeSize(BTNode* root);
int BTreeLeafSize(BTNode* root);
int BTreeHigh(BTNode* root);
int BTreeLevelKSize(BTNode* root, BTDataType k);
BTNode* BTreeFind(BTNode* root, BTDataType x);
void LevelOrder(BTNode* root);
void BTreeDestroy(BTNode* root);
bool IsCompleteBTree(BTNode* root);